<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateImageTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateImageLabel_path}" for="path" />
                    <h:inputText id="path" value="#{imageController.selected.path}" title="#{bundle.CreateImageTitle_path}" required="true" requiredMessage="#{bundle.CreateImageRequiredMessage_path}"/>
                    <h:outputLabel value="#{bundle.CreateImageLabel_alt}" for="alt" />
                    <h:inputText id="alt" value="#{imageController.selected.alt}" title="#{bundle.CreateImageTitle_alt}" required="true" requiredMessage="#{bundle.CreateImageRequiredMessage_alt}"/>
                    <h:outputLabel value="#{bundle.CreateImageLabel_description}" for="description" />
                    <h:inputText id="description" value="#{imageController.selected.description}" title="#{bundle.CreateImageTitle_description}" required="true" requiredMessage="#{bundle.CreateImageRequiredMessage_description}"/>
                    <h:outputLabel value="#{bundle.CreateImageLabel_type}" for="type" />
                    <h:inputText id="type" value="#{imageController.selected.type}" title="#{bundle.CreateImageTitle_type}" required="true" requiredMessage="#{bundle.CreateImageRequiredMessage_type}"/>
                    <h:outputLabel value="#{bundle.CreateImageLabel_idProperty}" for="idProperty" />
                    <h:selectOneMenu id="idProperty" value="#{imageController.selected.idProperty}" title="#{bundle.CreateImageTitle_idProperty}" required="true" requiredMessage="#{bundle.CreateImageRequiredMessage_idProperty}">
                        <f:selectItems value="#{propertyController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{imageController.create}" value="#{bundle.CreateImageSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{imageController.prepareList}" value="#{bundle.CreateImageShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateImageIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
